//
//  ViewController.m
//  UI22_数据库
//
//  Created by 王妍 on 16/1/7.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥. All rights reserved.
//

#import "ViewController.h"
#import "DataBaseManager.h"

@interface ViewController ()
#pragma mark - 修改表
- (IBAction)updataTable:(id)sender;
#pragma mark - 删除表
- (IBAction)deleteTable:(id)sender;
#pragma mark - 关闭数据库
- (IBAction)closeDB:(id)sender;
#pragma mark - 打开数据库
- (IBAction)openLite:(id)sender;
#pragma mark - 创建表
- (IBAction)createTable:(id)sender;
#pragma mark - 删除
- (IBAction)dropTable:(id)sender;
#pragma mark - 添加
- (IBAction)insertTable:(id)sender;
#pragma mark - 查找
- (IBAction)selectTable:(id)sender;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)updataTable:(id)sender {
}

- (IBAction)deleteTable:(id)sender {
}

- (IBAction)closeDB:(id)sender {
    
    [[DataBaseManager shareInstance] closeDB];
}

- (IBAction)openLite:(id)sender {
    // 创建单例对象
    DataBaseManager *dbManager = [DataBaseManager shareInstance];
    // 打开数据库
    [dbManager openDB];
    
}

- (IBAction)createTable:(id)sender {
    [[DataBaseManager shareInstance] createTable];
}

- (IBAction)dropTable:(id)sender {
}

- (IBAction)insertTable:(id)sender {
}

- (IBAction)selectTable:(id)sender {
}
@end
